import 'package:pacsun/view/task/theme/app_colors.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
// -------------------------------------------------------------------------
import '../../provider/themeProv.dart' show ThemeModeProvider;

class CreateStatistics extends StatelessWidget {
  const CreateStatistics({super.key});

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.only(top: 20),
      child: Center(
        child: SizedBox(
          width: 332.w,
          height: 49.h,
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            // crossAxisAlignment:
            //     CrossAxisAlignment.center, // Align text to the left
            children: [
              _buildStatItem("18", "Monthly Posts"),
              // SizedBox(width: 35.w), // Spacing between items
              _buildStatItem(r"$235.00", "Monthly Income"),
              // SizedBox(width: 35.w),
              _buildStatItem(r"$8,542.00", "Total Income"),
            ],
          ),
        ),
      ),
    );
  }

  Widget _buildStatItem(String value, String label) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        Text(
          value,
          style:
              customTextStyle(fontWeight: 700, height: 16 / 18, fontSize: 18),
          textAlign: TextAlign.center,
        ),
        Text(
          label,
          style: customTextStyle(fontWeight: 300, height: 27 / 12, opacity: .6),
          textAlign: TextAlign.center, // text-align: center
        )
      ],
    );
  }
}
